package com.sina.testweibo;

import com.weibo.net.AccessToken;
import com.weibo.net.Weibo;
import com.weibo.net.WeiboException;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class TestWeibo extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Weibo weibo = Weibo.getInstance();
        weibo.setupConsumerConfig("", "");
        try {
			AccessToken at = weibo.getXauthAccessToken(this, "", "", "", 
					"");
		TextView tv = (TextView)this.findViewById(R.id.tv1);
		tv.setText(at.getToken());
		} catch (WeiboException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
        
    }
}